﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class RepgerFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As RepgerBE
        Dim tmpRepger As RepgerBE = New RepgerBE()
        Try
            With tmpRepger
                .ClaUsuario = convertDTFromDb.ConvertString(dr.Item("ClaUsuario"))
                .Fecha = convertDTFromDb.convertDateTime(dr.Item("Fecha"))
                .ImpCot = convertDTFromDb.ConvertDecimal(dr.Item("ImpCot"))
                .ImpOc = convertDTFromDb.ConvertDecimal(dr.Item("ImpOc"))
                .NumCot = convertDTFromDb.convertInt32(dr.Item("NumCot"))
                .NumCuenta = convertDTFromDb.ConvertString(dr.Item("NumCuenta"))
                .NumOc = convertDTFromDb.convertInt32(dr.Item("NumOc"))
                .NumReq = convertDTFromDb.convertInt32(dr.Item("NumReq"))
                .Solicita = convertDTFromDb.ConvertString(dr.Item("Solicita"))
                .Tipo = convertDTFromDb.ConvertString(dr.Item("Tipo"))
            End With
            Return tmpRepger
        Catch ex As Exception
            Throw
        Finally
            tmpRepger = Nothing
        End Try
    End Function
End Class
